<?php
include("../../tools/session.php");

// 如果登录成功
if ($is_login_success === true)
{
?>
<?php
   include("../../tools/mysql.php");
   db_connect();
   
   header("content-type: text/xml");
   echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
   echo "<user>\n";
   echo "<basic_info>\n";
   echo "<id>" . $_SESSION["user"]["id"] . "</id>\n";
   echo "<username>" . $_SESSION["user"]["username"] . "</username>\n";
   echo "<job_num>" . $_SESSION["user"]["job_num"] . "</job_num>\n";
   echo "<is_master>" . $_SESSION["user"]["is_master"] . "</is_master>\n";
   echo "</basic_info>\n";
   echo "</user>\n";
?>
<?php
}
// 如果登录失败或还未登录
else
{
   session_hop_page("../index.php");
   exit();
}
	  
?>
